<template>
    <div class="month">
        <loading v-if="loadingShow" loadingStyle="height: 400px;"></loading>
        <div v-if="monthListInfo">
            <ul class="weekBox">
               <li class="weekList" v-for="item in monthListInfo" :key="item.id">
                    <span class="weekDate">{{item.created_at}}</span>
                    <span class="weekTime">{{item.ym}}</span>
                    <span class="weekDown">申请提现&nbsp&nbsp 至&nbsp&nbsp 支付宝账号</span>
                    <span class="weekMoney">￥{{item.tixianmoney}}</span>
                    <span class="weekStatus" style="margin-left:50px" v-if="item.status=='0'">提现中</span>
                    <span class="weekStatus" style="margin-left:50px" v-if="item.status=='1'">提现完成</span>
                    <span class="weekStatus" style="margin-left:50px" v-if="item.status=='2'">提现失败</span>
                </li>
                
            </ul>
            <page :pageItem="pageInfo" style="width: 100%;margin-top:30px;" @pageChange="getMsg"></page>
        </div>
        <p class="nullMsgs" v-if="!loadingShow&&!monthListInfo">
            暂无消息
        </p>
    </div>
</template>
<script>
import page from '../../../page'
import loading from '../../../loading'
export default {
    name : "week",
    data () {
        return {
            msg : "最近一周",
            pageInfo:"",
            monthListInfo:"",
            loadingShow:true,
        }
    },
    components:{
        page,
        loading
    },
    created () {
        axios.get("/tixian/getEarnings/tixian").then(response=>{
            this.monthListInfo=response.data.data;
            this.pageInfo = response.data;
            this.loadingShow = false;
        })
    },
    methods: {
        getMsg(value){//翻页
        this.loadingShow = true;
            axios.get("/tixian/getEarnings/tixian?page="+value)
            .then(response=>{
                this.monthListInfo = response.data.data;
            })
        }
    }
}
</script>
<style>

    .weekList{
        font-size: 16px;
        line-height: 54px;
        color: #666666;
        padding-left: 17px;
        border-bottom: 1px dashed #dddddd;
    }
    .weekBox{
        padding: 0 22px;
    }
    .weekDate{
        margin-right: 16px;
    }
    .weekTime{
        margin-right: 114px;
    }
    .weekName{
        margin-right: 99px;
    }
   .month .weekDown{
        width:300px;
        padding: 0;
    }
</style>